<!-- include tpl=header title=会员登录 -->
<script type="text/javascript">
var open_vcode = '{$is_vcode}';
function check_input()
{
	var user = $("input[name=user]").val();
	if(!user){
		$.dialog.alert('账号不能为空','','error');
		return false;
	}
	var pass = $("input[name=pass]").val();
	if(!pass){
		$.dialog.alert('密码不能为空','','error');
		return false;
	}
	if(open_vcode == '1'){
		var chkcode = $("#_chkcode").val();
		if(!chkcode){
			$.dialog.alert('验证码不能为空','','error');
			return false;
		}
	}
	return true;
}
</script>
<form class="am-form" onsubmit="return check_input()" method="post" action="{url ctrl=login func=ok/}">
<input type="hidden" name="_back" id="_back" value="{$_back}" />
<fieldset>
	<legend>会员登录</legend>
	<div class="am-form-group">
		<label for="doc-ipt-email-1">账号</label>
		<input type="text" class="" id="doc-ipt-email-1" name="user" placeholder="请输入账号/邮箱/手机号" />
	</div>
	<div class="am-form-group">
		<label for="doc-ipt-pwd-1">密码</label>
		<input type="password" id="doc-ipt-pwd-1" name="pass" placeholder="请输入密码" />
	</div>
	<!-- if $is_vcode -->
	<div class="am-form-group">
		<label for="_chkcode">验证码 <img src="" border="0" align="absmiddle" id="vcode" class="hand" /></label>
		<input type="text" name="_chkcode" id="_chkcode" placeholder="请输入图片上的数字" />
		
	</div>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#vcode").phpok_vcode();
		$("#vcode").click(function(){
			$(this).phpok_vcode();
		});
	});
	</script>
	<!-- /if -->
	<div class="am-form-group">
		<button type="submit" class="am-btn am-btn-block am-btn-primary">登录</button>
	</div>
	<div class="am-form-group am-text-center">
		<a href="{$sys.url}" class="am-btn am-btn-default am-btn-xs">返回首页</a>
		<!-- if $login_sms || $login_email --><a href="{url ctrl=login func=getpass/}" class="am-btn am-btn-default am-btn-xs"><i class="am-icon-refresh"></i> 找回密码</a><!-- /if -->
		<a href="{url ctrl=register/}" class="am-btn am-btn-warning am-btn-xs"><i class="am-icon-user"></i> 会员注册</a>
	</div>
	
</fieldset>
</form>
<!-- include tpl=footer -->